<?php

namespace App\Http\Middleware;

use Closure;
use App\User;
use Illuminate\Support\Facades\Input;

class Demo
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
//        $name = Input::all();
//        $user = User::find(1);
//        echo '<pre>';
////        var_dump($user->email);
//        var_dump($user);
//        echo '</pre>';

//        if(!$request->user()){
//            return redirect('/');
//        }
//        if($request->has('foos')){
//            return $next($request);
//        }
        return $next($request);
    }
}
